if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SearchKala]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[SearchKala]

IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'[dbo].[SupportiveOrganizationReport]')
                    AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[SupportiveOrganizationReport]
